<?php echo "<a href=" . $this->url(array(
            'controller' => 'news',
            'action' => 'createnews'))
            .">".$this->translate('Add news')."</a>"; ?>
<center>
<table border="1px">
    <tr>
        <td width="50px">ID</td>
        <td width="150px">Name</td>
        <td width="200px">Text</td>
        <td width="100px">Date</td>
        <td width="100px">Action</td>
    </tr>
    
        <?php 
        foreach($this->news as $new){
            echo "<tr>";
            echo "<td width='50px'>$new[id]</td>";
            echo "<td width='150px'>$new[name]</td>";
            echo "<td width='200px'>$new[text]</td>";
            echo "<td width='150px'>$new[date]</td>";
            echo "<td>          <a href=" . $this->url(array(
                                'controller' => 'news',
                                'action' => 'update',
                                'id' => $new['id'])) . ">Update </a>
                                <a href=" . $this->url(array(
                                'controller' => 'news',
                                'action' => 'deletenews',
                                'id' => $new['id'])) . ">Delete</a>
                                </td>";
         echo "</tr>";  
         
        } 
        
        ?>
    
</table>
    <?php echo $this->paginationControl($this->news, 'Sliding', 'partials/paginator.phtml');?>
</center>